home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_03
/
9n03049a
< prev
next >
Wrap
Text File
|
1990-12-08
|
565b
|
24 lines
Listing 1 (start.c)
/* ---
Simple routine to start all the processes
for the lidar program. The program starts
each routine with a fork call, and then
terminates.
--- */
#include <stdio.h>
/* --- process names --- */
static char *tasks[] = { "lidar_acq",
"lidar_graph", "lidar_write",
"lidar_read", NULL};
main ()
{
int i = 0;
while (tasks[i] != NULL) {
if (fork()) /* child, start task */
execve (tasks[i], NULL, NULL);
i++;
}
}